﻿@using Super.Entities;
@model List<DGProduct>
@using Super.Infrastructure;
@using Super.DomainService;
@using Super.Common;
@{
    ViewBag.Title = "产品管理";
    
}
<div class="pageHeader">
    <form id="pagerForm" rel="pagerForm" onsubmit="return navTabSearch(this);" action="/admin/dinggou/search" method="post">
       <input type="hidden" name="pageNum" value="1" /><!--【必须】value=1可以写死-->
        
        <div class="searchBar">
            <ul class="searchContent">
                <li>
                    @Html.DWZTextBox("keyword", "关键词【编号、产品名称】")
                </li>
            </ul>
            @Html.SubBar()
        </div>
    </form>
</div>
<div class="pageContent">
    <div class="panelBar">
        <ul class="toolBar">
            <li><a class="buy" href="/admin/dinggou/buy?id={sid_user}" target="navTab" mask="true" height="600" warn="请选择一个产品" rel="dinggouBuy"><span>订购此商品</span></a></li>
        </ul>
    </div>
    <div layouth="116" id="w_list_print">
        <table class="list" width="98%" targettype="navTab" asc="asc" desc="desc">
            <thead>
                <tr>
                    <th width="30" orderfield="name" class="asc">编号</th>
                    <th width="100px">产品缩略图</th>
                    <th width="200">产品名称</th>
                    <th width="50">价格</th>
                    <th width="50">产品分类</th>
                    <th width="100">产品链接</th>
                    <th width="100">创建时间</th>
                    <th width="100">产品状态</th>
                </tr>
            </thead>
            <tbody>
                @foreach (var item in Model)
                {
                    <tr target="sid_user" rel="@item.ID">
                        <td>@item.ID</td>
                        <td><img src="@item.Img" width="100px" height="66px"></td>
                        <td>@item.Title</td>
                        <td>@item.LSPrice</td>
                        <td>@item.ProductCategory.Name</td>
                        <td><a href="@item.ProductLink" target="_blank">查看产品原链接</a></td>
                        <td>@item.CreateTime</td>
                        <td>@{
                                if(item.State==0)
                                {
                                    <span style="color: red">未审核</span>
                                }
                                
                                if(item.State==1)
                                {
                                    <span style="color: green">审核通过</span>
                                }

                            }
                            </td>
                    </tr>
                }
            </tbody>
        </table>
    </div>
    <div class="panelBar">
        <div class="pages">
            <span>共 @ViewBag.RecordCount 条</span>
        </div>
        <div class="pagination" targettype="navTab" totalcount="@ViewBag.RecordCount" numperpage="@ViewBag.PageSize" pagenumshown="10" currentpage="@ViewBag.PageIndex">
        </div>
    </div>
</div>
